﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;

namespace Architecture.Events
{
    /// <summary>
    /// 订单事件源[只在WEB层订阅与触发，通过session对事件源进行存储]
    /// </summary>
    internal class OrderEventArgs
    {
        #region Properties
        public decimal Price { get; set; }
        public int UserID { get; set; }
        #endregion

        #region Events
        public event Action<OrderEventArgs> Before;
        public event Action<OrderEventArgs> After;
        #endregion

        #region Methods
        public void OnBefore(OrderEventArgs e)
        {
            if (Before != null)
                Before(e);
        }
        public void OnAfter(OrderEventArgs e)
        {
            if (After != null)
                After(e);
        }
        #endregion

    }
}